import axios from './axios';

const skillUrl = 'skill'; // 个人求职意向

export default {
  // 创建技能
  postSkill(obj) {
    const postObj = {
      skillCate: obj.skillCate,
      skillDesc: obj.skillDesc,
      skillLevel: obj.skillLevel,
      skillName: obj.skillName,
    };
    return axios.post(`${skillUrl}`, postObj);
  },
  // 编辑技能
  putSkill(obj) {
    const postObj = {
      id: obj.id,
      skillCate: obj.skillCate,
      skillDesc: obj.skillDesc,
      skillLevel: obj.skillLevel,
      skillName: obj.skillName,
    };
    return axios.put(`${skillUrl}`, postObj);
  },
  // 技能列表
  getSkillList() {
    return axios.get(`${skillUrl}`);
  },
  // 删除技能
  delSkill(id) {
    return axios.delete(`${skillUrl}?id=${id}`);
  },
};
